<?xml version="1.0" encoding="UTF-8"?>
<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2010-2012 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 * Licensed under the Openbravo Commercial License version 1.1
 *************************************************************************
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Payment Execution</title>
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"/>
<script language="JavaScript" type="text/javascript" id="paramDirectory">
var baseDirectory = "../../../../../web/";
</script>
<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" id="paramLanguage">
  var defaultLang = "en_US";
</script>
<SCRIPT language="JavaScript" type="text/javascript" id="confirmOnChanges">var confirmOnChanges = true;</SCRIPT>
<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
<SCRIPT language="JavaScript" src="../../../../../web/js/djConfig.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/dojotoolkit/dojo/dojo.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/djDependencies.js" type="text/javascript"></SCRIPT>
<script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>

<script language="JavaScript" type="text/javascript">
function onLoadDo(){
  setProcessingMode('window', false);
  this.windowTables = new Array(
    new windowTableId('client', 'buttonSearch'),
    new windowTableId('tdbottomButtons', 'buttonProcess')
  );
  setWindowTableParentElement();
  this.tabsTables = new Array(
    new tabTableId('tdtopTabs')
  );
  setTabTableParentElement();
  enableShortcuts('edition');
  setBrowserAutoComplete(false);
  rememberIsReceipt();

  try {
    onloadFunctions();
  } catch (e) {}
  resizeArea();
  updateMenuIcon('buttonMenu');
  setWindowElementFocus('firstElement');
  loadPaymentMethodCombo();
}

function onResizeDo(){
  resizeArea();
}

function rememberIsReceipt() {
 var isReceipt = document.frmMain.elements["inpChkIsReceipt"].value;
 var receivedin = document.getElementById('paramReceivedIn');
 var paidout = document.getElementById('paramPaidOut');
 if ("Y" == isReceipt) {
   receivedin.checked = true;
   paidout.checked = false;
 } else {
   receivedin.checked = false;
   paidout.checked = true;
 }
}

function calculateNumRows() {
  resizeArea();
  document.getElementById("grid_sample").style.display = "block";
  var grid_header_height = document.getElementById("grid_sample_header").clientHeight + 1;
  var grid_row_height = document.getElementById("grid_sample_row").clientHeight + 1;
  if (getBrowserInfo('name').toUpperCase().indexOf("CHROME") != -1 || getBrowserInfo('name').toUpperCase().indexOf("SAFARI") != -1) {
    grid_header_height = grid_header_height + 1;
    grid_row_height = grid_row_height - 1;
  }
  var messagebox_cont = document.getElementById("messageBoxID");
  var filterRow1_cont = document.getElementById("filterRow1");
  var filterRow2_cont = document.getElementById("filterRow2");
  var filterRow3_cont = document.getElementById("filterRow3");
  var filterRow4_cont = document.getElementById("filterRow4");
  var filterRow5_cont = document.getElementById("filterRow5");
  var bottomrow_cont = document.getElementById("bottomRow");
  var related_info_cont = document.getElementById("related_info_cont");
  var client_height = document.getElementById("client").clientHeight;

  client_height = client_height
      - grid_header_height
      - (related_info_cont?related_info_cont.clientHeight:0)
      - (filterRow1_cont?filterRow1_cont.clientHeight:0)
      - (filterRow2_cont?filterRow2_cont.clientHeight:0)
      - (filterRow3_cont?filterRow3_cont.clientHeight:0)
      - (filterRow4_cont?filterRow4_cont.clientHeight:0)
      - (filterRow5_cont?filterRow5_cont.clientHeight:0)
      - (bottomrow_cont?bottomrow_cont.clientHeight:0)
      - (messagebox_cont?messagebox_cont.clientHeight:0);
  
  client_height = client_height - 20;
  var numRows = (client_height)/(grid_row_height);
  numRows = parseInt(numRows);
  if (numRows > 1) { numRows -= 1; }
  document.getElementById("grid_sample").style.display = "none";
  return numRows;
}
</script>
<script language="JavaScript" type="text/javascript">
function validate() {
  var frm = document.frmMain;
  if (frm.inpOrgId.value==null || frm.inpOrgId.value=="") {
    setWindowElementFocus(frm.inpOrgId);
    showJSMessage(7);
    return false;
  } else if (frm.inpPaymentMethod.value==null || frm.inpPaymentMethod.value=="") {
	setWindowElementFocus(frm.inpPaymentMethod);
	showJSMessage(7);
	return false;
  } else if (frm.inpFinancialAccount.value==null || frm.inpFinancialAccount.value=="") {
    setWindowElementFocus(frm.inpFinancialAccount);
	showJSMessage(7);
	return false;
  }
  
  return true;
}

function validateSelector(action) {
  var strSelectedRowList = "";
  if(action == "SAVE") {
    rows = dijit.byId('grid').getSelectedRows();
    if (rows[0] === undefined) {
      showJSMessage('NotSelected');
      return false;
    }
    for(var i=0; i < rows.length; i++) {
      var rowkey = rows[i].split("#");
      if (i==0)
        strSelectedRowList = rowkey;
      else
        strSelectedRowList = strSelectedRowList + "," + rowkey;
    }
  }
  document.frmMain.elements["inpSelectedRowList"].value = strSelectedRowList;
  submitThisPage('DEFAULT');
}

function submitThisPage(strCommand) {
  if (validate()) {
	  openServletNewWindow('DEFAULT', true, '../org.openbravo.advpaymentmngt.ad_actionbutton/ExecutePayments.html', 'ExecutePayments', null, false, '600', '800');
    return true;
  }
  return true;
}

function updateHeader(liveGrid, offset) {
  var backendPageSize = liveGrid.getBackendPageSize();
  var currPageStart = (liveGrid.metaData.getBackendPage()*backendPageSize);
  var pageFull = (liveGrid.metaData.getTotalRows() >= backendPageSize);
  var firstPage = (liveGrid.metaData.getBackendPage() == 0);
  var res =  "<nobr class='Main_ToolBar_text_bookmark'>";
  var strPrevious = getMessage("GridPreviousPage");
  var strNext = getMessage("GridNextPage");
  
  if (!firstPage) {
    res = res + "<a href='#' onclick='gridMovePage(\"PREVIOUSPAGE\")' class='Main_ToolBar_text_pagerange'>" + strPrevious + " " + backendPageSize + "</a>&nbsp;&nbsp;";
  }
  res = res + ((liveGrid.visibleRows>0)?(currPageStart+offset+1):0) + " - "+ (currPageStart+offset+liveGrid.visibleRows) + " / " + (currPageStart+liveGrid.metaData.getTotalRows());
  if (pageFull) {
    res = res + "&nbsp;&nbsp;<a href='#' onclick='gridMovePage(\"NEXTPAGE\")' class='Main_ToolBar_text_pagerange'>" + strNext + " " + backendPageSize + "</a>";
  }
  
  liveGrid.setGridPaging(!firstPage,pageFull);
  res = res + "</nobr>";
  dojo.byId('bookmark').innerHTML = res;
}

function onGridLoadDo() {
  if (selectedRow==null) return true;
  if (selectedRow<=0) dijit.byId('grid').goToFirstRow();
  else dijit.byId('grid').goToRow(selectedRow);
  return true;
}

function setGridFilters(newparams) {
  var params = [];
  params["newFilter"] = "1";
  if (newparams!=null && newparams.length>0) {
    var total = newparams.length;
    for (var i=0;i<total;i++) {
      params[newparams[i][0]] = newparams[i][1];
    }
  }
  dijit.byId('grid').setRequestParams(params);
  return true;
}

function gridMovePage(direction) {
  dijit.byId('grid').gridMovePage(direction);
  return true;
}
</script>
<script language="JavaScript" type="text/javascript">
function loadFinancialAccountCombo() {
  try {
    var url = "../org.openbravo.advpaymentmngt.ad_forms/BatchPaymentExecution.html";
    var paramXMLReq = null;
    return submitXmlHttpRequest(callBackFinancialAccount, document.frmMain, "CALLOUTFINANCIALACCOUNT", url, false, null, paramXMLReq);
  } catch (e) {
    alert(e);
  }
}

function loadPaymentMethodCombo() {
  try {
    var url = "../org.openbravo.advpaymentmngt.ad_forms/BatchPaymentExecution.html";
    var paramXMLReq = null;
    return submitXmlHttpRequest(callBackPaymentMethod, document.frmMain, "CALLOUTPAYMENTMETHOD", url, false, null, paramXMLReq);
  } catch (e) {
    alert(e);
  }
}

function callBackFinancialAccount(paramXMLParticular, XMLHttpRequestObj) {
  var strText = "";
  if (getReadyStateHandler(XMLHttpRequestObj)) {
    try {
      if (XMLHttpRequestObj.responseText) {
        strText = XMLHttpRequestObj.responseText;
        createCombo(document.getElementById('inpFinancialAccount'), strText);
      } else {
        document.getElementById('inpFinancialAccount').innerHTML = '';
      }
    } catch (e) {
    }
  }
  return true;
}

function callBackPaymentMethod(paramXMLParticular, XMLHttpRequestObj) {
  var strText = "";
  if (getReadyStateHandler(XMLHttpRequestObj)) {
    try {
      if (XMLHttpRequestObj.responseText) {
        strText = XMLHttpRequestObj.responseText;
        createCombo(document.getElementById('inpPaymentMethod'), strText);
        loadFinancialAccountCombo();
      } else {
        document.getElementById('inpPaymentMethod').innerHTML = '';
      }
    } catch (e) {
    }
  }
  return true;
}
</script>
<script language="JavaScript" type="text/javascript" id="selectedColumn">  
  var selectedRow = 0;
  var orderByPositions = new Array("1");
  var orderByDirections = new Array("ASC");
</script>
</head>
<body onload="onLoadDo();" onresize="onResizeDo();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" id="paramMessage">
      
<form method="post" action="BatchPaymentExecution.html" name="frmMain" >
<input type="hidden" name="Command" />
<input type="hidden" name="inpLastFieldChanged" value=""></input>
<input type="hidden" name="inpKeyName" value="">
<input type="hidden" name="inpSelectedRowList" id="inpSelectedRowList" value="">
<input type="hidden" name="inpwindowId" id="inpwindowId" value="">
<input type="hidden" name="inpTabId" id="inpTabId" value="">
<input type="hidden" name="inpChkIsReceipt" id="inpChkIsReceipt" value="Y">
<input type="hidden" name="isReceipt" value="dummyField" id="fieldReceipt"/>

<table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
  <tr>
    <td valign="top" id="tdleftTabs"></td>
    <td valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
        <tr><td class="Main_NavBar_bg_left" id="tdleftSeparator"></td></tr>
        <tr><td class="Main_ToolBar_bg_left" valign="top"></td></tr>
        <tr><td class="Main_Client_bg_left"></td></tr>
        <tr><td class="Main_Bottom_bg_left"></td></tr>
      </table>
    </td>
    <td valign="top">
      <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
      <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
        <tr id="paramParentTabContainer"></tr>
        <tr id="paramMainTabContainer"></tr>
        <tr id="paramChildTabContainer"></tr>
      </table>
      <div class="Main_ContentPane_Client" style="overflow: auto; display: none; border-bottom: 0px none;" id="client">
        <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
          <tr>
            <td>
              <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
                <tr>
                  <td>
                  <!-- MessageBox -->

                    <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
                      <tbody>
                        <tr class="MessageBox_TopMargin">
                          <td class="MessageBox_LeftMargin"></td>
                          <td></td>
                          <td class="MessageBox_RightMargin"></td>
                        </tr>
                        <tr>
                          <td class="MessageBox_LeftMargin"></td>
                          <td>

                            <table cellpadding="0" cellspacing="0" class="MessageBox_Container">
                              <tbody>
                                <tr>
                                  <td class="MessageBox_LeftTrans">
                                    <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                                      <tbody>
                                        <tr>
                                          <td class="MessageBox_TopLeft"></td>
                                        </tr>
                                        <tr>
                                          <td class="MessageBox_Left"></td>
                                        </tr>
                                      </tbody>
                                    </table>
                                  </td>
                                  <td class="MessageBox_bg">
                                    <table class="MessageBox_Top">
                                      <tbody>
                                        <tr>
                                          <td>
                                            <span>
                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
                                                <tbody>
                                                <tr>
                                                  <td class="MessageBox_Icon_ContentCell">
                                                    <div class="MessageBox_Icon"></div>
                                                  </td>
                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
                                                    <span>
                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
                                                        xxInfo: AccessTableWithNoView
                                                      </div>
                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
                                                        xxThe current information is empty.
                                                      </div>
                                                      <div class="MessageBox_TextSeparator"></div>
                                                    </span>
                                                  </td>
                                                </tr>
                                                </tbody>
                                              </table>
                                            </span>
                                          </td>
                                        </tr>
                                      </tbody>
                                    </table>
                                  </td>
                                  <td class="MessageBox_RightTrans">
                                    <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                                      <tbody>
                                        <tr><td class="MessageBox_TopRight"></td></tr>
                                        <tr><td class="MessageBox_Right"></td></tr>
                                      </tbody>
                                    </table>
                                  </td>
                                </tr>
                                <tr>
                                  <td rowspan="2" class="MessageBox_BottomLeft"></td>
                                  <td class="MessageBox_BottomTrans MessageBox_bg"></td>
                                  <td rowspan="2" class="MessageBox_BottomRight"></td>
                                </tr>
                                <tr><td class="MessageBox_Bottom"></td></tr>
                              </tbody>
                            </table>

                          </td>
                          <td class="MessageBox_RightMargin"></td>
                        </tr>
                        <tr class="MessageBox_BottomMargin">
                          <td class="MessageBox_LeftMargin"></td>
                          <td></td>
                          <td class="MessageBox_RightMargin"></td>
                        </tr>
                      </tbody>
                    </table>
                    
                    <!-- USER CONTROLS START-->
                    <table class="Main_Client_TableEdition">
                      <tr>
                        <td class="TableEdition_OneCell_width"></td>
                        <td class="TableEdition_OneCell_width"></td>
                        <td class="TableEdition_OneCell_width"></td>
                        <td class="TableEdition_OneCell_width"></td>
                      </tr>
                
                      <!-- Line 1 -->
                      <tr id="filterRow1">
                        <td class="TitleCell"><span class="LabelText">Organization</span></td>
                        <td class="Combo_ContentCell">
                        <select  name="inpOrgId" id="paramOrgId" class="ComboKey Combo_TwoCells_width" required="true" onchange="loadPaymentMethodCombo(); return true;">
                          <div id="reportAD_ORGID"></div>
                        </select></td>
                      </tr>
            
                      <!-- Line 2 -->
                      <tr id="filterRow2">
                        <td class="TitleCell"><span class="LabelText">Payment Method</span></td>
                        <td class="Combo_ContentCell">
                          <select name="inpPaymentMethod"
                                  onkeypress="changeToEditingMode('onkeypress');"
                                  onchange="changeToEditingMode('onchange', this);logChanges(this); loadFinancialAccountCombo(); return true;"
                                  class="ComboKey Combo_TwoCells_width" id="inpPaymentMethod">
                            <div id="sectionDetailPaymentMethod"></div>
                          </select>
                        </td>
                        <td class="TitleCell"><span class="LabelText">Financial Account</span></td>
                        <td class="Combo_ContentCell">
                          <select name="inpFinancialAccount"
                                  onkeypress="changeToEditingMode('onkeypress');"
                                  onchange="changeToEditingMode('onchange', this);logChanges(this); return true;"
                                  class="ComboKey Combo_TwoCells_width" id="inpFinancialAccount">
                            <div id="sectionDetailFinancialAccount"></div>
                          </select>
                        </td>
                      </tr>
                
                      <!-- Line 3 -->
                      <tr id="filterRow3"> 
                        <td class="TitleCell"><span class="LabelText">Date From</span></td>
                        <td class="TextBox_btn_ContentCell">
                          <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                            <tr>
                              <td class="TextBox_ContentCell">
                                <input type="text" id="paramDateFrom" class="dojoValidateValid TextBox_btn_OneCell_width" value="" maxlength="10" name="inpDateFrom" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" onchange="" displayFormat="xx" saveFormat="xx"></input>
                                <!-- <input dojoType="openbravo:DateTextbox" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateFrom" id="paramDateFrom" size="10" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;" onblur=""></input><script>djConfig.searchIds.push("paramDateFrom");</script> -->
                              </td>
                              <td class="FieldButton_ContentCell">
                                <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpDateFrom', document.frmMain.inpDateFrom.value, false);return false;">
                                  <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                                    <tr>
                                      <td class="FieldButton_bg">
                                        <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                                      </td>
                                    </tr>
                                  </table>
                                </a>
                              </td>
                            </tr>
                          </table>
                        </td>
                  
                        <td class="TitleCell"><span class="LabelText">Date To</span></td>
                        <td class="TextBox_btn_ContentCell">
                          <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                            <tr>
                              <td class="TextBox_ContentCell">
                                <input type="text" id="paramDateTo" class="dojoValidateValid TextBox_btn_OneCell_width" value="" maxlength="10" name="inpDateTo" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" onchange="" displayFormat="xx" saveFormat="xx"></input>
                                <!-- <input dojoType="openbravo:DateTextbox" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateTo" id="paramDateTo" size="10" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;" onblur=""></input><script>djConfig.searchIds.push("paramDateTo");</script> -->
                              </td>
                              <td class="FieldButton_ContentCell">
                                <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpDateTo', document.frmMain.inpDateTo.value, false);return false;">
                                  <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                                    <tr>
                                      <td class="FieldButton_bg">
                                        <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                                      </td>
                                    </tr>
                                  </table>
                                </a>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      
                      <!-- Line 4 -->
                      <tr id="filterRow4">
                        <td class="TableEdition_OneCell_width TitleCell">
                          <span class="LabelText"><label for="paramReceivedIn">Received In</label></span>
                        </td>
                        <td class="Radio_Check_ContentCell">
                          <SPAN class="Checkbox_container_NOT_Focused">
                            <INPUT type="radio" name="inpIsReceipt" id="paramReceivedIn" value="Y" checked onchange="loadPaymentMethodCombo(); return true;" onclick=""/>
                          </SPAN>
                        </td>
                        <td class="TableEdition_OneCell_width TitleCell">
                          <span class="LabelText"><label for="paramPaidOut">Paid Out</label></span>
                        </td>
                        <td class="Radio_Check_ContentCell">
                          <SPAN class="Checkbox_container_NOT_Focused">
                            <INPUT type="radio" name="inpIsReceipt" id="paramPaidOut" value="N" onchange="loadPaymentMethodCombo(); return true;" onclick=""/>
                          </SPAN>
                        </td>
                      </tr>
                      
                      <tr id="filterRow5">
                        <td></td>
                        <td class="Button_LeftAlign_ContentCell">
                          <div>
                           <button type="button" 
                              id="buttonSearch" 
                              class="ButtonLink" 
                              onclick="validate();setFilters();return false;" 
                              onfocus="buttonEvent('onfocus', this); window.status='Search'; return true;" 
                              onblur="buttonEvent('onblur', this);" 
                              onkeyup="buttonEvent('onkeyup', this);" 
                              onkeydown="buttonEvent('onkeydown', this);" 
                              onkeypress="buttonEvent('onkeypress', this);" 
                              onmouseup="buttonEvent('onmouseup', this);" 
                              onmousedown="buttonEvent('onmousedown', this);" 
                              onmouseover="buttonEvent('onmouseover', this); window.status='Search'; return true;" 
                              onmouseout="buttonEvent('onmouseout', this);">
                              <table class="Button">
                                <tr>
                                  <td class="Button_left"><img class="Button_Icon Button_Icon_search" alt="Search" title="Search" src="../../../../../web/images/blank.gif" border="0" /></td>
                                  <td class="Button_text Button_width">Search</td>
                                  <td class="Button_right"></td>
                                </tr>
                              </table>
                            </button>
                          </div>
                        </td>
                        <td></td>
                        <td></td>
                      </tr>
                      
                      <!-- GRID START-->
                      <tr>
                        <td colspan="6">
                          <div class="Popup_ContentPane_Client" id="client_middle">
                            <table cellspacing="0" cellpadding="0" width="10px" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="grid_sample">
                              <tr class="DataGrid_Body_Row" id="grid_sample_header">
                                <th width="10px" class="DataGrid_Header_Cell">DataGrid</th>
                              </tr>
                              <tr class="DataGrid_Body_Row DataGrid_Body_Row_1" id="grid_sample_row">
                                <td class="DataGrid_Body_Cell">Loading...</td>
                              </tr>
                            </table>
                            <table cellspacing="0" cellpadding="0" width="0px" height="0px" cellspacing="0" cellpadding="0">
                              <tr>
                                <td><input type="text" class="DataGrid_Table_Dummy_Input" id="grid_table_dummy_input"></input></td>
                              </tr>
                            </table>
                            <table width="100%" cellspacing="0" cellpadding="0" border="0" id="grid_bookmark">
                              <tr>
                                <td class="DataGrid_Popup_text_container">
                                  <div id="bookmark">
                                    <nobr class='DataGrid_Popup_text_bookmark'>&nbsp;</nobr>
                                  </div>
                                </td>
                              </tr>
                            </table>
                            <table width="100%" cellspacing="0" cellpadding="0" border="0" class="Main_Client_TableRelation" id="grid_table">
                              <tr>
                                <td>
                                  <div id="grid" dojotype="openbravo.widget.DataGrid"
                                    structureurl="../org.openbravo.advpaymentmngt.ad_forms/BatchPaymentExecution.html?Command=STRUCTURE"
                                    dataurl="../org.openbravo.advpaymentmngt.ad_forms/BatchPaymentExecution.html?Command=DATA"
                                    updatesurl="../org.openbravo.advpaymentmngt.ad_forms/BatchPaymentExecution.html?Command=DATA"
                                    calculatenumrows="true" editable="false" sortable="true"
                                    deleteable="true" oninvalidvalue="alert" onscroll="updateHeader"
                                    ongridload="onGridLoadDo" buffersize="3.0" showlinenumbers="true"
                                    offset="0" sortcols="1" sortdirs="ASC" defaultrow="0"
                                    maxwidth="99%" percentagewidthrelativetoid="client"
                                    multipleRowSelection="true"
                                    preventcache="true" usecache="true" cachecontent="false">
                                  </div>
                                </td>
                              </tr>
                            </table>
                          </div>
                        </td>
                      </tr>
                      
                      <!-- GRID END-->
                      <tr id="bottomRow">
                        <td></td>
                        <td class="Button_LeftAlign_ContentCell">
                          <div>
                            <button type="button"
                              id="buttonProcess"
                              class="ButtonLink" 
                              onclick="validateSelector('SAVE');return false;"
                              onfocus="buttonEvent('onfocus', this); window.status='Process'; return true;"
                              onblur="buttonEvent('onblur', this);"
                              onkeyup="buttonEvent('onkeyup', this);"
                              onkeydown="buttonEvent('onkeydown', this);"
                              onkeypress="buttonEvent('onkeypress', this);"
                              onmouseup="buttonEvent('onmouseup', this);"
                              onmousedown="buttonEvent('onmousedown', this);"
                              onmouseover="buttonEvent('onmouseover', this); window.status='Process'; return true;"
                              onmouseout="buttonEvent('onmouseout', this);">
                              <table class="Button">
                                <tr>
                                  <td class="Button_left"><img class="Button_Icon Button_Icon_process" alt="Process" title="Process" src="../../../../../web/images/blank.gif" border="0" /></td>
                                  <td class="Button_text Button_width">Process</td>
                                  <td class="Button_right"></td>
                                </tr>
                              </table>
                            </button>
                          </div>
                        </td>
                        <td class="TitleCell"></td>
                        <td class="ContentCell"></td>
                      </tr>
                    </table>
                    <!-- USER CONTROLS END-->
              </td>
            </tr>
            </table>
            </td>
            </tr>
          </table>
        </div>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
            <tr>
              <td class="Main_Bottom_bg"><img src="../../../../../web/images/blank.gif" border="0"></td>
            </tr>
          </table>
        </td>
        <td valign="top">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
            <tr><td class="Main_NavBar_bg_right"></td></tr>
            <tr><td class="Main_ToolBar_bg_right" valign="top"></td></tr>
            <tr><td class="Main_Client_bg_right"></td></tr>
            <tr><td class="Main_Bottom_bg_right"></td></tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
